package com.bjpowernode.app;
import java.io.File;
public class MyApp4 {
    //递归遍历文件夹
    public void all(File file) {
        System.out.println(file.getAbsolutePath());
        if (file.isDirectory()) {
            File[] files = file.listFiles();
            for (File fileTemp : files) {
                all(fileTemp);
            }
        }
    }
    public static void main(String[] args) {
        //对文件夹的遍历
        MyApp4 myApp4 = new MyApp4();
        String path = "D:\\sz2208\\hzj\\016-io";
        File file = new File(path);
        myApp4.all(file);
    }
}